<template>
  <view v-if="shenheStatus == 0" class="page">
    <view class="express-box" v-if="express_info">
      <view>
        <image
          :src="express_info.goods_pic"
          mode="aspectFit"
          style="width: 160rpx; height: 160rpx"
        ></image>
      </view>
      <view style="margin: 0 20rpx">
        <view style="margin-bottom: 20rpx; font-size: 38rpx">{{
          express_info.express
        }}</view>
        <view>{{ express_info.express_no }}</view>
        <view>{{ express_info.status_text }}</view>
      </view>
    </view>
    <view
      v-if="express_info.list && express_info.list.length > 0"
      style="padding: 20rpx; font-size: 28rpx"
    >
      <div
        style="border-bottom: 1px solid #f0f0f0; padding: 20rpx 0"
        v-for="(express, index) in express_info.list"
        :key="index"
      >
        <div style="color: #426ab3">{{ express.datetime }}</div>
        <div>{{ express.detail }}</div>
      </div>
    </view>
  </view>
  <Shenhe v-else-if="shenheStatus == 1"></Shenhe>
</template>

<script>
import Shenhe from '@/components/shenhe/shenhe';
export default {
  components:{
        Shenhe,
  },
  data() {
    return {
      order_id: 0,
      express_info: null,
    };
  },
  onLoad(t) {
    uni.setNavigationBarTitle({
      title: this.$t("title.expressDetail"),
    });
    this.order_id = t.id;
    this.getExpress();
  },
  methods: {
    getExpress() {
      this.$allrequest.order
        .expressDetail({
          order_id: this.order_id,
        })
        .then((res) => {
          this.express_info = res.data;
        });
    },
  },
};
</script>

<style lang="scss"scoped>
.express-box {
  display: flex;
  padding: 20rpx;
}
</style>
